//
//  cehsiiiViewController.m
//  cehsiii
//
//  Created by wangjun on 10-9-9.
//  Copyright __MyCompanyName__ 2010. All rights reserved.
//
#import "cehsiiiViewController.h"
#import "ASIFormDataRequest.h"
@implementation cehsiiiViewController

-(IBAction)pack:(id)sender;
{
	[self sendpost];
}

-(NSString *)md5:(NSString *)str {
	const char *cStr = [str UTF8String];
	unsigned char result[32];
	CC_MD5( cStr, strlen(cStr), result );
	return [NSString stringWithFormat:
			@"%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X",
			result[0], result[1], result[2], result[3], 
			result[4], result[5], result[6], result[7],
			result[8], result[9], result[10], result[11],
			result[12], result[13], result[14], result[15]
			]; 
}

-(void)sendpost
{
  NSString *urlString = [NSString stringWithFormat:@"http://dsddd"]; 
	ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:urlString]];
	[request setPostValue:[self getXml] forKey:@"RequestInfo"];
   [request startSynchronous];
	NSLog(@"response\n%@",[request responseString]);
	[request release];
}
-(NSString *)getXml
{

	return [NSString stringWithFormat:@"xml....",[[self md5:@"mima"] lowercaseString]];
 }

- (void)didReceiveMemoryWarning {
	// Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
	
	// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
	// Release any retained subviews of the main view.
	// e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
}

@end
